home *** CD-ROM | disk | FTP | other *** search
/ Private: Geographic / Private: Geographic.iso / HELP.DXR / 00003.ls < prev    next >
Encoding:
Text File  |  1998-03-23  |  2.4 KB  |  66 lines

  1. property ImageUp, ImageRoll, ImageDown, Sonidodown, SonidoUp, Clicked
  2.  
  3. on mouseEnter me
  4.   if the Clicked of me then
  5.     if the mouseDown then
  6.       set the member of sprite the spriteNum of me to the ImageDown of me
  7.     else
  8.       set the member of sprite the spriteNum of me to the ImageRoll of me
  9.     end if
  10.   else
  11.     set the member of sprite the spriteNum of me to the ImageRoll of me
  12.   end if
  13.   cursor(280)
  14. end
  15.  
  16. on mouseDown me
  17.   set the member of sprite the spriteNum of me to the ImageDown of me
  18.   puppetSound("Down")
  19.   set the Clicked of me to 1
  20.   pass()
  21. end
  22.  
  23. on mouseLeave me
  24.   set the member of sprite the spriteNum of me to the ImageUp of me
  25.   cursor(-1)
  26. end
  27.  
  28. on mouseUp me
  29.   set the member of sprite the spriteNum of me to the ImageRoll of me
  30.   puppetSound("Up")
  31.   updateStage()
  32.   if the Clicked of me then
  33.     set the Clicked of me to 0
  34.     pass()
  35.   end if
  36. end
  37.  
  38. on mouseUpOutSide me
  39.   set the member of sprite the spriteNum of me to the ImageUp of me
  40.   set the Clicked of me to 0
  41. end
  42.  
  43. on beginSprite me
  44.   set the Clicked of me to 0
  45. end
  46.  
  47. on getPropertyDescriptionList
  48.   if the currentSpriteNum = 0 then
  49.     set memdefault1 to 0
  50.   else
  51.     set memref to the member of sprite the currentSpriteNum
  52.     set castLibNum to the castLibNum of memref
  53.     set memdefault0 to member the memberNum of member memref of castLib castLibNum
  54.     set memdefault1 to member (the memberNum of member memref + 1) of castLib castLibNum
  55.     set memdefault2 to member (the memberNum of member memref + 2) of castLib castLibNum
  56.     set memdefault3 to member "Down" of castLib castLibNum
  57.     set memdefault4 to member "Up" of castLib castLibNum
  58.   end if
  59.   set p_list to [#ImageUp: [#comment: "Button Up Image:", #format: #member, #default: memdefault0], #ImageRoll: [#comment: "Button Rollover Image:", #format: #member, #default: memdefault1], #ImageDown: [#comment: "Button Down Image:", #format: #member, #default: memdefault2], #Sonidodown: [#comment: "Sonido pulsado:", #format: #member, #default: memdefault3], #SonidoUp: [#comment: "Sonido Up:", #format: #member, #default: memdefault4]]
  60.   return p_list
  61. end
  62.  
  63. on getBehaviorDescription
  64.   return "Es un boton de tres estados sin sonido" & RETURN & "En mi opinion es boton debe tener sonido" & RETURN & RETURN & "PARAMETROS:" & RETURN & "ImageUp:   el cast member del boton normal (mascara)" & RETURN & "ImageRoll: el cast member para rollover" & RETURN & "ImageDown: el cast member para cuando se pulsa el boton"
  65. end
  66.